package com.matt.foundation.vo;

import com.matt.domain.Feeds;
import lombok.Data;

import javax.persistence.Column;
import java.util.Date;

@Data
public class FeedsVO {
    private String staffId = "";

    private String childrenId = "";

    private String place = "";

    private String event = "";

    private String eventType;

    private String title;

    private String content;

    private String images;

    private String videos;

    private String linkId;

    private String url;

    private Date created = new Date();


    public static FeedsVO of(Feeds f){
        FeedsVO feeds = new FeedsVO();
        feeds.setStaffId(f.getStaffId());
        feeds.setChildrenId(f.getChildrenId());
        feeds.setPlace(f.getPlace());
        feeds.setEvent(f.getEvent());
        feeds.setEventType(f.getEventType());
        feeds.setTitle(f.getTitle());
        feeds.setContent(f.getContent());
        feeds.setImages(f.getImages());
        feeds.setVideos(f.getVideos());
        feeds.setLinkId(f.getLinkId());
        feeds.setUrl(f.getUrl());
        return feeds;
    }
}
